package com.yjd.comm.easycard.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.easycard.model.EasycardExchangeModel;
import com.yjd.comm.system.dto.OperParamDto;

/**
 * <b>description</b>：易借卡更换记录表业务接口<br>
 * <b>time</b>：2015-05-18 15:39:08 <br>
 * <b>author</b>： SongJian 491835898@qq.com
 */
public interface IEasycardExchangeService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public EasycardExchangeModel insert(EasycardExchangeModel model)
			throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(EasycardExchangeModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long id) throws Exception;

	/**
	 * 更换易借卡
	 * 
	 * @param last_card
	 *            上一张卡
	 * @param reason
	 *            换卡原因
	 * @param operParamDto 操作人
	 * @return
	 * @throws Exception
	 */
	public int exchange_card(Long last_card, String reason,OperParamDto operParamDto) throws Exception;
}
